function [ handles ] = patchMontage ( filename, rects )

load_settings;

img = imread(filename);
imgs = [];
for ix = 1:size(rects,1)
    x = rects(ix,1);
    y = rects(ix,2);
    xx= rects(ix,3);
    yy= rects(ix,4);
    tt = double(imresize(img(y:y+yy, x:x+xx, :), reshape_size));
    imgs(:,:,:,ix) = tt./max(tt(:));
end

handles = imdisp(imgs, 'Size', montage_dims, 'Border', [ montage_border montage_border ]);
end